package com.example.springmvc_exception.springmvc自定义的简单异常处理器;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@RequestMapping("/test")
public class 简单异常处理器 {

    @RequestMapping("/querySingleBook")
    @ResponseBody
    public void querySingleBook(){
        //此处只是为了进行案例演示
        if(2<3){
            throw new RuntimeException("查询的书本编号小于100，异常抛出！！");
        }
    }

}